package com.pan.hisystem.mapper;

import com.pan.hisystem.pojo.PrescriptionDrugs;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author qingyang
 * @since 2022-03-18
 */
@Repository
public interface PrescriptionDrugsMapper extends BaseMapper<PrescriptionDrugs> {

    /**
     * 根据处方获取药品（有处方id和药品名）
     * @param preId
     * @return
     */
    List<PrescriptionDrugs> getDrugs(Integer preId);

    /**
     * 取药
     * @param ids
     * @return
     */
    int updateDrugs(@Param(value = "ids")Integer[] ids);
}
